#include <bits/stdc++.h>
#define int long long
using namespace std;

int n;
double p[105][105];
double rows[105][105];

void gauss()
{
    for (int row = 1; row <= n; row++) {
        int now = row;
        for (int i = row + 1; i <= n; i++)
            if (fabs(rows[i][row]) > fabs(rows[now][row]))
                now = i;
        if (now != row)
            for (int i = 1; i <= n + 1; i++)
                swap(rows[now][i], rows[row][i]);
        for (int i = row + 1; i <= n + 1; i++)
            rows[row][i] /= rows[row][row];
        for (int i = 1; i <= n; i++)
            if (i != row && fabs(rows[i][row]) > 1e-7)
                for (int j = row + 1; j <= n + 1; j++)
                    rows[i][j] -= rows[i][row] * rows[row][j];
    }
}

signed main()
{
    cin >> n;
    for (int i = 1; i <= n + 1; i++)
        for (int j = 1; j <= n; j++)
            cin >> p[i][j];
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
            rows[i][j] = 2 * (p[i][j] - p[i + 1][j]), rows[i][n + 1] += (p[i][j] + p[i + 1][j]) * (p[i][j] - p[i + 1][j]);
    gauss();
    for (int i = 1; i <= n; i++)
        cout << fixed << setprecision(3) << rows[i][n + 1] << " ";
    return 0;
}
